//package com.xiao.message.rest;
//
//import com.xiao.foundation.resource.AbstractResource;
//import com.xiao.message.domain.UserNotification;
//import com.xiao.message.service.UserNotificationService;
//import com.xiao.message.service.dto.UserNotificationDto;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.http.ResponseEntity;
//import org.springframework.web.bind.annotation.*;
//
//import java.net.URISyntaxException;
//
//@RestController
//@RequestMapping("/notification/user")
//@Slf4j
//@Api(tags = "消息分配", value = "消息中心-用户消息对象")
//public class UserNotificationResource extends AbstractResource<UserNotification, UserNotificationDto, Long> {
//
//    private final UserNotificationService userNotificationService;
//    public UserNotificationResource(UserNotificationService service) {
//        super(service, UserNotification.class.getSimpleName());
//        this.userNotificationService = service;
//    }
//
//    @Override
//    protected Long getId(UserNotificationDto dto) {
//        return dto.getId();
//    }
//
//    @ApiOperation("创建用户消息")
//    @PostMapping("")
//    public ResponseEntity<UserNotificationDto> createUserMessage(@RequestBody UserNotificationDto userNotificationDto) throws URISyntaxException {
//        return createEntity(userNotificationDto);
//    }
//
//    @ApiOperation("更新用户消息")
//    @PutMapping("{id}")
//    public ResponseEntity<UserNotificationDto> updateUserMessage(
//            @PathVariable("id") Long id,
//            @RequestBody UserNotificationDto userNotificationDto) {
//        return updateEntity(id, userNotificationDto);
//    }
//
//    @ApiOperation("删除用户消息")
//    @DeleteMapping("/{userNotificationId}")
//    public ResponseEntity<Void> deleteUserNotification(@PathVariable(name = "userNotificationId") Long userNotificationId) {
//        return deleteEntity(userNotificationId);
//    }
//
//    @ApiOperation("删除多个用户消息")
//    @DeleteMapping("")
//    public ResponseEntity<Void> deleteChooseUserNotification(Long[] userNotificationIds) {
//        userNotificationService.deleteBatch(userNotificationIds);
//        return ResponseEntity.noContent().build();
//    }
//}
